//
//  BaseSystemTabBarController.swift
//  Edaixi-iOS
//
//  Created by 刘树华 on 2017/11/27.
//  Copyright © 2017年 刘树华. All rights reserved.
//

import Foundation
import UIKit
class BaseTabBarController:UITabBarController  {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
       let home = addChildVC(VCName: ViewController.self, title: "首页", image: "", selectedImage: "")
        self.viewControllers = [home]
    }
    
    func addChildVC (VCName:UIViewController.Type,title:String,image:String,selectedImage:String) ->UINavigationController  {
        let vc = VCName.init()
        let nav = BaseNavigationController(rootViewController: vc)
        
       
        nav.tabBarItem =  UITabBarItem(title: title, image: UIImage(named:image), selectedImage: UIImage(named:selectedImage)?.withRenderingMode(.alwaysOriginal))
        
        
        return nav
 
    }
    
    
}
